package com.ruoyi.web.controller.faq;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.faq.domain.FaqKnowledge;
import com.ruoyi.faq.service.IFaqService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/faq")
public class FaqController extends BaseController {

    @Autowired
    private IFaqService faqService;

    /**
     * 智能问答
     */
    @PostMapping("/ask")
    public AjaxResult ask(@RequestBody String question) {
        String answer = faqService.smartAnswer(question);
        return AjaxResult.success(answer);
    }

}
